<template>
    <van-sticky>
        <van-nav-bar title="列表" left-arrow @click-left="onClickLeft" />
    </van-sticky>
    <div>
        <van-card v-for="item in 20" num="2" price="2.00" desc="描述信息" title="商品标题"
            thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg" @click="goods"/>

    </div>
</template>

<script setup>
import { ref } from "vue";
// import {axios} from 'axios'
import { useRouter, useRoute } from 'vue-router'
const router = new useRouter()
const route = new useRoute()

// const search = ref([]);
// axios.get("https://api-hmugo-web.itheima.net/api/public/v1/goods/search", {
//     params: {
//         cid: route.query.cid
//     }
// }).then(res => {
//     search.value = res.data.message.goods
// })
const goods=(cid)=>{
    router.push({
        path:'/Detail',
        query:{
            cid
        }
    })
}
</script>

<style lang="scss" scoped></style>